
//
//	cove.utils.setInterval - 2011 July 8th
//
//	Standarizing IE's setInterval method to allow for optional arguments to be passed to the
//	callback function
//
//-------------------------------------------------------------------------------------------------

if(xb.Browser.IE) {
	if(xb.Function.support.bind) {
		cove.utils.setInterval = function(callback, delay) {
			var args = Array.prototype.slice.call(arguments);
			args.splice(0, 2);
			args.unshift(this);
			return window.setInterval(
				Function.prototype.bind.apply(callback, args),
				delay
			);
		};
	} else {
		cove.utils.setInterval = function(callback, delay) {
			var args = Array.prototype.slice.call(arguments);
			args.splice(0, 2);
			return window.setInterval(
				function() {
					callback.apply(this, args);
				},
				delay
			);
		};
	}
} else {
	cove.utils.setInterval = window.setInterval;
}

var setInterval = cove.utils.setInterval;